1. Field
The present invention relates to a technique for matching an image using template matching.
2. Related Art
When an object is detected by template matching, the occurrence of variation between a registered image and an image to be matched reduces the detection accuracy. The variation refers herein to displacement and rotation, enlargement and reduction, slight deformation of an object, change of lighting, addition of image noise, etc., for example.
In view of the above, a plurality of model templates corresponding to various variations can be prepared. For example, model templates are generated from model images taken from different angles, model images taken under different lighting, or model images to which noise is added. Thus, detection is possible even if variation is applied.
Also, in view of the above, Berg, Alexander C., and Jitendra Malik. “Geometric blur for template matching.” Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on. Vol. 1. IEEE, 2001 proposes a method referred to as “Geometric Blur”. This method applies a Gaussian filter having a larger variance at a greater distance from the origin in view of the position of a feature and thus the method can perform template matching that is robust to variations.
Since a method that generates and uses the plurality of model templates needs the same number of search processes as the number of the model templates, the processing time increases linearly according to the number of the model templates.
Furthermore, the method described in the above-mentioned Berg, Alexander C., and Jitendra Malik. “Geometric blur for template matching.” Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on. Vol. 1. IEEE, 2001, which applies a Gaussian filter, can be applied only to features (e.g., brightness features) that are continuous quantities and have a unimodal distribution. If the above condition is not satisfied, such as the case where quantized brightness gradient directions are used as features, the method of the above-mentioned Berg, Alexander C., and Jitendra Malik. “Geometric blur for template matching.” Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on. Vol. 1. IEEE, 2001 cannot be employed.